File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ type Enhancer<T> = (next: Work<T>) => Work<T>;
33type Middleware < Setup , Result > = ( setup : Setup ) => Enhancer < Result > ;
44
55export default function concatMiddleware < Setup , Result > (
6- ...middleware : Middleware < Setup , Result > [ ]
6+ ...middleware : readonly Middleware < Setup , Result > [ ]
77) : Middleware < Setup , Result > {
88 return setupArgs => {
99 const setup = middleware . reduce ( ( setup , middleware ) => {
Original file line number Diff line number Diff line change 11const EMPTY_ARRAY : readonly any [ ] = Object . freeze ( [ ] ) ;
22
3- export default function singleToArray ( singleOrArray : undefined ) : readonly never [ ] ;
4- export default function singleToArray < T > ( singleOrArray : T | T [ ] ) : readonly T [ ] ;
5-
63/** @deprecated Will be removed on or after 2028-03-16. */
7- export default function singleToArray < T > ( singleOrArray : T | T [ ] ) : readonly T [ ] {
4+ export default function singleToArray < T > ( singleOrArray : T | readonly T [ ] ) : readonly T [ ] {
85 return typeof singleOrArray === 'undefined'
9- ? EMPTY_ARRAY
6+ ? ( EMPTY_ARRAY as readonly T [ ] )
107 : Object . freeze ( Array . isArray ( singleOrArray ) ? [ ...singleOrArray ] : [ singleOrArray ] ) ;
118}
You can’t perform that action at this time.
0 commit comments