From dc2973879253a523ca54c4421b7ce2caf280f92d Mon Sep 17 00:00:00 2001 From: Larry Botha Date: Sun, 7 Nov 2021 13:48:04 +0200 Subject: [PATCH] feat(index.d.ts): use unicorn-suggested type names BREAKING CHANGE: All types that were named *Props now use the full *Properties form to improve readability --- lib/index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/index.d.ts b/lib/index.d.ts index 27974d8..83a75f6 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -11,21 +11,21 @@ export type FormProps> = { validationSchema?: ObjectSchema; } & svelte.JSX.HTMLAttributes; -type FieldProps = { +type FieldProperties = { name: string; type?: string; value?: string; } & svelte.JSX.HTMLProps; -type SelectProps = { +type SelectProperties = { name: string; } & svelte.JSX.HTMLProps; -type ErrorProps = { +type ErrorProperties = { name: string; } & svelte.JSX.HTMLProps; -type TextareaProps = { +type TextareaProperties = { name: string; } & svelte.JSX.HTMLProps; @@ -58,7 +58,7 @@ type FormState> = { handleSubmit: (event: Event) => any; }; -declare function createForm>(formProps: { +declare function createForm>(formProperties: { initialValues: Inf; onSubmit: (values: Inf) => any | Promise; validate?: (values: Inf) => any | undefined; @@ -74,25 +74,25 @@ declare class Form extends SvelteComponentTyped< > {} declare class Field extends SvelteComponentTyped< - FieldProps, + FieldProperties, Record, Record > {} declare class Textarea extends SvelteComponentTyped< - TextareaProps, + TextareaProperties, Record, Record > {} declare class Select extends SvelteComponentTyped< - SelectProps, + SelectProperties, Record, {default: any} > {} declare class ErrorMessage extends SvelteComponentTyped< - ErrorProps, + ErrorProperties, Record, {default: any} > {}