File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ import {
1414 get ,
1515 writable ,
1616 type Readable ,
17- type Writable
17+ type Writable ,
18+ type Updater
1819} from 'svelte/store' ;
1920import { onDestroy , tick } from 'svelte' ;
2021import { browser } from '$app/environment' ;
@@ -203,7 +204,15 @@ type SuperFormEventList<T extends AnyZodObject, M> = {
203204
204205// eslint-disable-next-line @typescript-eslint/no-explicit-any
205206export type SuperForm < T extends ZodValidation < AnyZodObject > , M = any > = {
206- form : Writable < Validation < T , M > [ 'data' ] > ;
207+ form : {
208+ subscribe : Readable < z . infer < T > > [ 'subscribe' ] ;
209+ set ( this : void , value : z . infer < T > , options : { taint ?: boolean } ) : void ;
210+ update (
211+ this : void ,
212+ updater : Updater < z . infer < T > > ,
213+ options : { taint ?: boolean }
214+ ) : void ;
215+ } ;
207216 formId : Writable < string | undefined > ;
208217 errors : Writable < Validation < T , M > [ 'errors' ] > ;
209218 constraints : Writable < Validation < T , M > [ 'constraints' ] > ;
Original file line number Diff line number Diff line change 6464 </div >
6565 {/each }
6666 <button >Submit</button >
67+ <button
68+ type =" button"
69+ on:click ={() => {
70+ form .update (
71+ ($form ) => {
72+ $form .tags [3 ].id = 7 ;
73+ return $form ;
74+ },
75+ { taint: false }
76+ );
77+ }}>Change without taint</button
78+ >
6779</form >
6880
6981<style lang =" scss" >
You can’t perform that action at this time.
0 commit comments