-
Notifications
You must be signed in to change notification settings - Fork 2
isViewModel
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
.
Overview
Motivation
Guides and Tutorials - Getting Started
Releases
CodeSandbox
API
Events
IEvent
IEventHandler
EventDispatcher
ViewModels
INotifyPropertiesChanged
ViewModel
Forms
Form
IFormFieldConfig
FormField
ReadOnlyFormCollection
FormCollection
IConfigurableFormCollection
FormSetupCallback
Validation
IValidator
ValidatorCallback
IObjectValidator
IValidatable
Validation / Triggers
WellKnownValidationTrigger
ValidationTrigger
Observable Collection
ReadOnlyObservableCollection
ObservableCollection
INotifyCollectionChanged
CollectionChangeOperation
INotifyCollectionReordered
CollectionReorderOperation
Observable Map
ReadOnlyObservableMap
ObservableMap
INotifyMapChanged
MapChangeOperation
Observable Set
ReadOnlyObservableSet
ObservableSet
INotifySetChanged
SetChangeOperation
Dependency Handling
IDependencyResolver
IDependencyContainer
DependencyContainer
useDependency
useViewModelDependency
useDependencyResolver
React Hooks
useViewModel
useViewModelMemo
useObservableCollection
useObservableMap
useObservableSet