Skip to content

Commit b5d030f

Browse files
author
Larry Botha
authored
Merge pull request #119 from tjinauyeung/fix/overwritten-sveltekit-types
fix(typescript definitions): replace manual svelte.JSX declaration with official svelte2tsx defs
2 parents f846e04 + c72a947 commit b5d030f

File tree

4 files changed

+157
-979
lines changed

4 files changed

+157
-979
lines changed

lib/index.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
/// <reference path="svelte-jsx.d.ts" />
1+
/// <reference lib="svelte2tsx" />
22
import type {SvelteComponentTyped} from 'svelte';
33
import type {Readable, Writable} from 'svelte/store';
44
import type {ObjectSchema} from 'yup';
55

66
export type FormProps<Inf = Record<string, any>> = {
7-
initialValues: Inf;
8-
onSubmit: ((values: Inf) => any) | ((values: Inf) => Promise<any>);
7+
context?: FormState;
8+
initialValues?: Inf;
9+
onSubmit?: ((values: Inf) => any) | ((values: Inf) => Promise<any>);
910
validate?: (values: Inf) => any | undefined;
1011
validationSchema?: ObjectSchema<any>;
1112
} & svelte.JSX.HTMLAttributes<HTMLFormElement>;

0 commit comments

Comments
 (0)