diff --git a/src/cdk/coercion/array.ts b/src/cdk/coercion/array.ts index 6ab9c7eb1d4b..d76caf60ccde 100644 --- a/src/cdk/coercion/array.ts +++ b/src/cdk/coercion/array.ts @@ -7,6 +7,8 @@ */ /** 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[]): readonly T[]; export function coerceArray(value: T | 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..72cc86a324bb 100644 --- a/tools/public_api_guard/cdk/coercion.d.ts +++ b/tools/public_api_guard/cdk/coercion.d.ts @@ -3,6 +3,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[]): readonly T[]; export declare function coerceBooleanProperty(value: any): boolean;