Skip to content

Instantly share code, notes, and snippets.

@marvinhagemeister
marvinhagemeister / bind-plugin.ts
Last active July 10, 2024 08:09
Preact Signals `bind:value`
import { options } from "preact";
import { Signal } from "@preact/signals";
// Add `bind:value` to JSX types
declare global {
namespace preact.createElement.JSX {
interface HTMLAttributes {
"bind:value"?: Signal<string | string[] | number | undefined>;
}
}