import { createForm as coreCreateForm } from '@felte/core' ; import { writable } from 'svelte/store' ; import { onDestroy } from 'svelte' ; import type { Form , FormConfig , FormConfigWithInitialValues , FormConfigWithoutInitialValues , } from '@felte/core' ; type Obj = Record < string , any > ; param config category export function createForm < Data extends Obj = any , Ext extends Obj = any > ( config ) ; param config export function createForm < Data extends Obj = any , Ext extends Obj = any > ( config ) ; export function createForm < Data extends Obj = any , Ext extends Obj = any > ( config ) { const { cleanup , ... rest } = coreCreateForm ( config , { storeFactory : writable , } ) ; onDestroy ( cleanup ) ; return rest ; }