Typedef

ObservableWithProperty (utils)

@ckeditor/ckeditor5-utils/src/observablemixin

typedefobject

A helper type that can be used as a constraint, ensuring the type is both observable and have the given property.

// Ensures that `obj` is `Observable` and have property named 'abc'.
function f<O extends ObservableWithProperty<'abc'>>( obj: O ) {}

// Ensures that `obj` is `Observable` and have property named 'abc' with value `number`.
function f<O extends ObservableWithProperty<'abc', number>>( obj: O ) {}

Filtering

Type parameters