[]previous and next page

Directives

The app's directives, by name, typed by their argument: declaration-merge it so use:name={argument} checks the argument.

The app's directives, by name, typed by their argument: declaration-merge it so use:name={argument} checks the argument. Empty by default; a name without an entry accepts any argument.

Import#

ts
import type { Directives } from "@shadow-js/web";

Signature#

ts
interface Directives {}

Examples#

ts
import type { JSX } from "@shadow-js/web/jsx-runtime";

declare module "@shadow-js/web/jsx-runtime" {
  interface Directives {
    tooltip: string;
  }
}
const save: JSX.Element = <button use:tooltip={"Save the draft"}>Save</button>;