Skip to content

Commit

Permalink
Merge pull request #146 from tjinauyeung/feat/improve-type-names
Browse files Browse the repository at this point in the history
  • Loading branch information
larrybotha authored Nov 7, 2021
2 parents 682c300 + dc29738 commit 66019ba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ export type FormProps<Inf = Record<string, unknown>> = {
validationSchema?: ObjectSchema<any>;
} & svelte.JSX.HTMLAttributes<HTMLFormElement>;

type FieldProps = {
type FieldProperties = {
name: string;
type?: string;
value?: string;
} & svelte.JSX.HTMLProps<HTMLInputElement>;

type SelectProps = {
type SelectProperties = {
name: string;
} & svelte.JSX.HTMLProps<HTMLSelectElement>;

type ErrorProps = {
type ErrorProperties = {
name: string;
} & svelte.JSX.HTMLProps<HTMLDivElement>;

type TextareaProps = {
type TextareaProperties = {
name: string;
} & svelte.JSX.HTMLProps<HTMLTextAreaElement>;

Expand Down Expand Up @@ -58,7 +58,7 @@ type FormState<Inf = Record<string, any>> = {
handleSubmit: (event: Event) => any;
};

declare function createForm<Inf = Record<string, any>>(formProps: {
declare function createForm<Inf = Record<string, any>>(formProperties: {
initialValues: Inf;
onSubmit: (values: Inf) => any | Promise<any>;
validate?: (values: Inf) => any | undefined;
Expand All @@ -74,25 +74,25 @@ declare class Form extends SvelteComponentTyped<
> {}

declare class Field extends SvelteComponentTyped<
FieldProps,
FieldProperties,
Record<string, unknown>,
Record<string, unknown>
> {}

declare class Textarea extends SvelteComponentTyped<
TextareaProps,
TextareaProperties,
Record<string, unknown>,
Record<string, unknown>
> {}

declare class Select extends SvelteComponentTyped<
SelectProps,
SelectProperties,
Record<string, unknown>,
{default: any}
> {}

declare class ErrorMessage extends SvelteComponentTyped<
ErrorProps,
ErrorProperties,
Record<string, unknown>,
{default: any}
> {}
Expand Down

0 comments on commit 66019ba

Please sign in to comment.