Browse documentation

Directive

Type. Runtime directive callback.

Table of contents

Category

Type

Type import

ts
import type { Directive } from "valyrian.js";

Public signature

ts
interface Directive { (value: any, vnode: VnodeWithDom, oldProps?: Properties): false | void | any; }

Type usage

Directive receives its value, the vnode with DOM and optional previous properties. Returning false stops later directive work for that patch.