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
.
-
TViewModel - The type of view model to check, defaults to
INotifyPropertiesChanged
.Type constraints: INotifyPropertiesChanged.
Default value: INotifyPropertiesChanged.
-
maybeViewModel:
any
The value to check if is a view model.
Returns true
if the provided instance implements INotifyPropertiesChanged
; otherwise false
.