Skip to content

isViewModel

github-actions[bot] edited this page Nov 17, 2024 · 2 revisions
API / isViewModel function

Checkes whether the provided instance is a view model (implements INotifyPropertiesChanged).

function isViewModel<TViewModel extends INotifyPropertiesChanged = INotifyPropertiesChanged>(
  maybeViewModel: any
): maybeViewModel is TViewModel

Source reference: src/viewModels/isViewModel.ts:10.

Generic Parameters

Parameters

  • maybeViewModel: any
    The value to check if is a view model.

Returns: maybeViewModel is TViewModel

Returns true if the provided instance implements INotifyPropertiesChanged; otherwise false.

Clone this wiki locally