Skip to content

Commit cae94df

Browse files
committed
fix(cdk/coercion): add the support for readonly array coercion
Fixes a type definition of coerceArray so that it accepts both mutable and immutable arrays. Fixes #18806
1 parent 807498d commit cae94df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdk/coercion/array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
*/
88

99
/** Wraps the provided value in an array, unless the provided value is an array. */
10-
export function coerceArray<T>(value: T | T[]): T[] {
10+
export function coerceArray<T>(value: T | readonly T[]): T[] {
1111
return Array.isArray(value) ? value : [value];
1212
}

0 commit comments

Comments
 (0)