@@ -1169,7 +1169,18 @@ declare namespace Xrm {
11691169 */
11701170 getAttribute (
11711171 delegateFunction ?: Collection . MatchingDelegate < Attributes . Attribute > ,
1172- ) : Collection . ItemCollection < Attributes . Attribute > | null ;
1172+ ) : Attributes . Attribute [ ] ;
1173+
1174+ /**
1175+ * Gets a collection of attributes using a delegate function or gets all attributes if delegateFunction is not provided.
1176+ * @param T An Attribute type.
1177+ * @param delegateFunction A matching delegate function
1178+ * @returns An collection of attributes.
1179+ * @see {@link https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/collections External Link: Collections (Client API reference) }
1180+ */
1181+ getAttribute < T extends Attributes . Attribute > (
1182+ delegateFunction ?: Collection . MatchingDelegate < Attributes . Attribute > ,
1183+ ) : T [ ] ;
11731184
11741185 /**
11751186 * Gets a control by name or index.
@@ -1194,7 +1205,18 @@ declare namespace Xrm {
11941205 */
11951206 getControl (
11961207 delegateFunction ?: Collection . MatchingDelegate < Controls . Control > ,
1197- ) : Collection . ItemCollection < Controls . Control > | null ;
1208+ ) : Controls . Control [ ] ;
1209+
1210+ /**
1211+ * Gets a collection of controls using a delegate function or gets all controls if delegateFunction is not provided.
1212+ * @param T A Control type. There is no guarentee that all control types will match.
1213+ * @param delegateFunction A matching delegate function.
1214+ * @returns An collection of controls.
1215+ * @see {@link https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/collections External Link: Collections (Client API reference) }
1216+ */
1217+ getControl < T extends Controls . Control > (
1218+ delegateFunction ?: Collection . MatchingDelegate < Controls . Control > ,
1219+ ) : T [ ] ;
11981220 }
11991221
12001222 /**
@@ -1859,7 +1881,7 @@ declare namespace Xrm {
18591881 * @param delegate A matching delegate function
18601882 * @returns A T[] whose members have been validated by delegate or a entire array of T[]
18611883 */
1862- get ( delegate ?: MatchingDelegate < T > ) : T [ ] | null ;
1884+ get ( delegate ?: MatchingDelegate < T > ) : T [ ] ;
18631885
18641886 /**
18651887 * Gets the length of the collection.
0 commit comments