hunk.code_window:       element.addPropertyChangedCallback((key: string, val: any) =>
           setProps({ [key]: val } as any)
         );
         element.addReleaseCallback(() => dispose());
         const comp = (ComponentType as FunctionComponent<T>)(props as T, options);
         return insert(
           element.renderRoot,
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit:       element.addReleaseCallback(() => {
           element.renderRoot.textContent = "";
           dispose();
         });
  
hunk.file_path: packages/solid-element/src/index.ts
hunk.type: replace
file: import { untrack } from "solid-js";
  
  export function scan<T, U>(fn: (a: U, v: T) => U, seed: U): (v: () => T) => () => U;
  export function scan<T, U>(input: () => T, fn: (a: U, v: T) => U, seed: U): () => U;
  export function scan<T, U>(input: any, fn: any, seed?: U): any {
    if (arguments.length === 2) {
      seed = fn;
      fn = input;
      return scan;
    }
    return scan(input);
  
    function scan(input: () => T) {
      return () => {
        const value = input();
        return untrack(() => (seed = fn(seed, value)));
      };
    }
  }
  