isViewModel - Andrei15193/react-model-view-viewmodel GitHub Wiki

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.

⚠️ **GitHub.com Fallback** ⚠️