Packages

Helpers for rendering components from front-end frameworks in Phoenix

Current section

Files

Jump to
phx_frontend js dist adapter.d.ts
Raw

js/dist/adapter.d.ts

type PushEvent = (eventName: string, params: any) => void;
export type Adapter<TMountReturnValue extends Record<string, any>> = {
mount: (el: HTMLElement, props: Record<string, any>, callbacks: Record<string, string>, pushEvent: PushEvent) => TMountReturnValue;
update: (context: TMountReturnValue, props: Record<string, any>) => void;
unmount: (context: TMountReturnValue) => void;
};
export {};