Skip to content

Commit a900b56

Browse files
committed
use ReadonlyArray
1 parent fe2af84 commit a900b56

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/mui-styled-engine/src/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface SerializedStyles {
3535

3636
export type CSSProperties = CSS.PropertiesFallback<number | string>;
3737
export type CSSPropertiesWithMultiValues = {
38-
[K in keyof CSSProperties]: CSSProperties[K] | Array<Extract<CSSProperties[K], string>>;
38+
[K in keyof CSSProperties]: CSSProperties[K] | ReadonlyArray<Extract<CSSProperties[K], string>>;
3939
};
4040

4141
// TODO v6 - check if we can drop the unknown, as it breaks the autocomplete
@@ -49,7 +49,7 @@ export interface CSSOthersObject {
4949
}
5050
export type CSSPseudosForCSSObject = { [K in CSS.Pseudos]?: CSSObject };
5151

52-
export interface ArrayCSSInterpolation extends Array<CSSInterpolation> {}
52+
export interface ArrayCSSInterpolation extends ReadonlyArray<CSSInterpolation> {}
5353

5454
export interface CSSOthersObjectForCSSObject {
5555
[propertiesName: string]: CSSInterpolation;
@@ -98,7 +98,7 @@ export interface FunctionInterpolation<Props> {
9898
(props: Props): Interpolation<Props>;
9999
}
100100

101-
export interface ArrayInterpolation<Props> extends Array<Interpolation<Props>> {}
101+
export interface ArrayInterpolation<Props> extends ReadonlyArray<Interpolation<Props>> {}
102102

103103
export type Interpolation<Props> =
104104
| InterpolationPrimitive

packages/mui-system/src/styleFunctionSx/styleFunctionSx.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { OverwriteCSSProperties } from './OverwriteCSSProperties';
99
* Note that this extends to non-theme values also. For example `display=['none', 'block']`
1010
* will also works.
1111
*/
12-
export type ResponsiveStyleValue<T> = T | Array<T | null> | { [key: string]: T | null };
12+
export type ResponsiveStyleValue<T> = T | ReadonlyArray<T | null> | { [key: string]: T | null };
1313

1414
/**
1515
* Map of all CSS pseudo selectors (`:hover`, `:focus`, ...).

0 commit comments

Comments
 (0)