File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33
4+ ## [ 4.5.0] ( https://github.com/supercharge/arrays/compare/v4.4.0...v4.5.0 ) - 2024-07-xx
5+
6+ ### Updated
7+ - static ` from ` : improve typing for returned instance type. This allows subclassing the ` Arr ` class and receiving the correct class instance type
8+
9+
410## [ 4.4.0] ( https://github.com/supercharge/arrays/compare/v4.3.0...v4.4.0 ) - 2024-02-20
511
612### Added
713- ` compact ` : refined return type for truthy values
814
915### Updated
1016- ` sort ` : make the ` comparator ` parameter optional
11-
12- ### Updated
1317- bump dependencies
1418- bump dependencies in GitHub Actions testing workflow
1519
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ export class Arr<T> {
2727 }
2828
2929 /**
30- * Creates an array from an iterable object .
30+ * Creates an Arr instance from iterable values .
3131 */
32- static from < T > ( ...values : Values < T > ) : Arr < T > {
33- return new this < T > ( ...values )
32+ static from < T , Ctor extends Arr < T > > ( this : new ( ...values : Values < T > ) => Ctor , ... values : Values < T > ) : Ctor {
33+ return new this ( ...values )
3434 }
3535
3636 /**
You can’t perform that action at this time.
0 commit comments