diff --git a/src/cdk/coercion/array.ts b/src/cdk/coercion/array.ts index 6ab9c7eb1d4b..ca2d7104e1d0 100644 --- a/src/cdk/coercion/array.ts +++ b/src/cdk/coercion/array.ts @@ -7,6 +7,6 @@ */ /** Wraps the provided value in an array, unless the provided value is an array. */ -export function coerceArray(value: T | T[]): T[] { +export function coerceArray(value: T | readonly T[]): T[] { return Array.isArray(value) ? value : [value]; } diff --git a/tools/public_api_guard/cdk/coercion.d.ts b/tools/public_api_guard/cdk/coercion.d.ts index 1cf0d8e786ec..4cba9b987ecb 100644 --- a/tools/public_api_guard/cdk/coercion.d.ts +++ b/tools/public_api_guard/cdk/coercion.d.ts @@ -2,7 +2,7 @@ export declare function _isNumberValue(value: any): boolean; export declare type BooleanInput = string | boolean | null | undefined; -export declare function coerceArray(value: T | T[]): T[]; +export declare function coerceArray(value: T | readonly T[]): T[]; export declare function coerceBooleanProperty(value: any): boolean;