@@ -23,10 +23,13 @@ export interface ViewModel
2323 /** @deprecated Use createBlankInstanceAsync instead */
2424 createInstance ( ) : ViewModelInstance | undefined ;
2525
26+ /** Create a view model instance by name */
2627 createInstanceByNameAsync (
2728 name : string
2829 ) : Promise < ViewModelInstance | undefined > ;
30+ /** Create the default view model instance */
2931 createDefaultInstanceAsync ( ) : Promise < ViewModelInstance | undefined > ;
32+ /** Create a blank view model instance with default property values */
3033 createBlankInstanceAsync ( ) : Promise < ViewModelInstance | undefined > ;
3134}
3235
@@ -73,6 +76,7 @@ export interface ViewModelInstance
7376 */
7477 viewModel ( path : string ) : ViewModelInstance | undefined ;
7578
79+ /** Get a nested ViewModel instance at the given path. Supports "/" for nested access (e.g., "Parent/Child"). */
7680 viewModelAsync ( path : string ) : Promise < ViewModelInstance | undefined > ;
7781
7882 /**
@@ -96,6 +100,7 @@ export interface ViewModelNumberProperty
96100 ObservableProperty {
97101 /** @deprecated Use getValueAsync (read) or set(value) (write) instead */
98102 value : number ;
103+ /** Get the current value of the number property */
99104 getValueAsync ( ) : Promise < number > ;
100105 set ( value : number ) : void ;
101106 /** Add a listener to the view model number property. Returns a function to remove the listener. */
@@ -107,6 +112,7 @@ export interface ViewModelStringProperty
107112 ObservableProperty {
108113 /** @deprecated Use getValueAsync (read) or set(value) (write) instead */
109114 value : string ;
115+ /** Get the current value of the string property */
110116 getValueAsync ( ) : Promise < string > ;
111117 set ( value : string ) : void ;
112118 /** Add a listener to the view model string property. Returns a function to remove the listener. */
@@ -118,6 +124,7 @@ export interface ViewModelBooleanProperty
118124 ObservableProperty {
119125 /** @deprecated Use getValueAsync (read) or set(value) (write) instead */
120126 value : boolean ;
127+ /** Get the current value of the boolean property */
121128 getValueAsync ( ) : Promise < boolean > ;
122129 set ( value : boolean ) : void ;
123130 /** Add a listener to the view model boolean property. Returns a function to remove the listener. */
@@ -129,6 +136,7 @@ export interface ViewModelColorProperty
129136 ObservableProperty {
130137 /** @deprecated Use getValueAsync (read) or set(value) (write) instead */
131138 value : number ;
139+ /** Get the current value of the color property */
132140 getValueAsync ( ) : Promise < number > ;
133141 set ( value : number ) : void ;
134142 /** Add a listener to the view model color property. Returns a function to remove the listener. */
@@ -140,6 +148,7 @@ export interface ViewModelEnumProperty
140148 ObservableProperty {
141149 /** @deprecated Use getValueAsync (read) or set(value) (write) instead */
142150 value : string ;
151+ /** Get the current value of the enum property */
143152 getValueAsync ( ) : Promise < string > ;
144153 set ( value : string ) : void ;
145154 /** Add a listener to the view model enum property. Returns a function to remove the listener. */
@@ -175,7 +184,9 @@ export interface ViewModelListProperty
175184 readonly length : number ;
176185 /** @deprecated Use getInstanceAtAsync instead */
177186 getInstanceAt ( index : number ) : ViewModelInstance | undefined ;
187+ /** The number of instances in the list */
178188 getLengthAsync ( ) : Promise < number > ;
189+ /** Get the instance at the given index */
179190 getInstanceAtAsync ( index : number ) : Promise < ViewModelInstance | undefined > ;
180191 /** Add an instance to the end of the list */
181192 addInstance ( instance : ViewModelInstance ) : void ;
0 commit comments