Skip to content

Commit 844c9bb

Browse files
committed
fix: resolve TypeScript errors
1 parent 51a2ead commit 844c9bb

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

lib/node_modules/@stdlib/array/base/group-entries-by/docs/types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ type Indicator<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>;
7474
/**
7575
* Interface describing returned group results.
7676
*/
77-
interface EntriesResults<K, T> {
77+
interface EntriesResults<T> {
7878
/**
7979
* Object properties.
8080
*/
81-
[key: K]: Array<[ number, T ]>;
81+
[key: Key]: Array<[ number, T ]>;
8282
}
8383

8484
/**
@@ -99,7 +99,7 @@ interface EntriesResults<K, T> {
9999
* var out = groupEntriesBy( x, indicator );
100100
* // returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
101101
*/
102-
declare function groupEntriesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, indicator: Indicator<T, U>, thisArg?: ThisParameterType<Indicator<T, U>> ): EntriesResults<Key, T>;
102+
declare function groupEntriesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, indicator: Indicator<T, U>, thisArg?: ThisParameterType<Indicator<T, U>> ): EntriesResults<T>;
103103

104104

105105
// EXPORTS //

lib/node_modules/@stdlib/array/base/group-entries/docs/types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ type Key = string | symbol | number;
3030
/**
3131
* Interface describing returned group results.
3232
*/
33-
interface EntriesResults<K, T> {
33+
interface EntriesResults<T> {
3434
/**
3535
* Object properties.
3636
*/
37-
[key: K]: Array<[ number, T ]>;
37+
[key: Key]: Array<[ number, T ]>;
3838
}
3939

4040
/**
@@ -51,7 +51,7 @@ interface EntriesResults<K, T> {
5151
* var out = groupEntries( x, groups );
5252
* // returns { 'b': [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], 'f': [ [ 2, 'foo' ] ] }
5353
*/
54-
declare function groupEntries<T = unknown>( x: Collection<T> | AccessorArrayLike<T>, groups: Collection<Key> | AccessorArrayLike<Key> ): EntriesResults<Key, T>;
54+
declare function groupEntries<T = unknown>( x: Collection<T> | AccessorArrayLike<T>, groups: Collection<Key> | AccessorArrayLike<Key> ): EntriesResults<T>;
5555

5656

5757
// EXPORTS //

lib/node_modules/@stdlib/array/base/group-indices-by/docs/types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ type Indicator<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>;
7474
/**
7575
* Interface describing returned group results.
7676
*/
77-
interface IndicesResults<K, T> {
77+
interface IndicesResults<T> {
7878
/**
7979
* Object properties.
8080
*/
81-
[key: K]: Array<T>;
81+
[key: Key]: Array<T>;
8282
}
8383

8484
/**
@@ -99,7 +99,7 @@ interface IndicesResults<K, T> {
9999
* var out = groupIndicesBy( x, indicator );
100100
* // returns { 'b': [ 0, 1, 3 ], 'f': [ 2 ] }
101101
*/
102-
declare function groupIndicesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, indicator: Indicator<T, U>, thisArg?: ThisParameterType<Indicator<T, U>> ): IndicesResults<Key, number>;
102+
declare function groupIndicesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, indicator: Indicator<T, U>, thisArg?: ThisParameterType<Indicator<T, U>> ): IndicesResults<number>;
103103

104104

105105
// EXPORTS //

lib/node_modules/@stdlib/array/base/group-indices/docs/types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ type Key = string | symbol | number;
3030
/**
3131
* Interface describing returned group results.
3232
*/
33-
interface IndicesResults<K, T> {
33+
interface IndicesResults<T> {
3434
/**
3535
* Object properties.
3636
*/
37-
[key: K]: Array<T>;
37+
[key: Key]: Array<T>;
3838
}
3939

4040
/**
@@ -51,7 +51,7 @@ interface IndicesResults<K, T> {
5151
* var out = groupIndices( x, groups );
5252
* // returns { 'b': [ 0, 1, 3 ], 'f': [ 2 ] }
5353
*/
54-
declare function groupIndices<T = unknown>( x: Collection<T> | AccessorArrayLike<T>, groups: Collection<Key> | AccessorArrayLike<Key> ): IndicesResults<Key, number>;
54+
declare function groupIndices<T = unknown>( x: Collection<T> | AccessorArrayLike<T>, groups: Collection<Key> | AccessorArrayLike<Key> ): IndicesResults<number>;
5555

5656

5757
// EXPORTS //

lib/node_modules/@stdlib/array/base/group-values-by/docs/types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ type Indicator<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>;
7474
/**
7575
* Interface describing returned group results.
7676
*/
77-
interface ValuesResults<K, T> {
77+
interface ValuesResults<T> {
7878
/**
7979
* Object properties.
8080
*/
81-
[key: K]: Array<T>;
81+
[key: Key]: Array<T>;
8282
}
8383

8484
/**
@@ -99,7 +99,7 @@ interface ValuesResults<K, T> {
9999
* var out = groupValuesBy( x, indicator );
100100
* // returns { 'b': [ 'beep', 'boop', 'bar' ], 'f': [ 'foo' ] }
101101
*/
102-
declare function groupValuesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, indicator: Indicator<T, U>, thisArg?: ThisParameterType<Indicator<T, U>> ): ValuesResults<Key, T>;
102+
declare function groupValuesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, indicator: Indicator<T, U>, thisArg?: ThisParameterType<Indicator<T, U>> ): ValuesResults<T>;
103103

104104

105105
// EXPORTS //

lib/node_modules/@stdlib/array/base/group-values/docs/types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ type Key = string | symbol | number;
3030
/**
3131
* Interface describing returned group results.
3232
*/
33-
interface ValuesResults<K, T> {
33+
interface ValuesResults<T> {
3434
/**
3535
* Object properties.
3636
*/
37-
[key: K]: Array<T>;
37+
[key: Key]: Array<T>;
3838
}
3939

4040
/**
@@ -51,7 +51,7 @@ interface ValuesResults<K, T> {
5151
* var out = groupValues( x, groups );
5252
* // returns { 'b': [ 'beep', 'boop', 'bar' ], 'f': [ 'foo' ] }
5353
*/
54-
declare function groupValues<T = unknown>( x: Collection<T> | AccessorArrayLike<T>, groups: Collection<Key> | AccessorArrayLike<Key> ): ValuesResults<Key, T>;
54+
declare function groupValues<T = unknown>( x: Collection<T> | AccessorArrayLike<T>, groups: Collection<Key> | AccessorArrayLike<Key> ): ValuesResults<T>;
5555

5656

5757
// EXPORTS //

0 commit comments

Comments
 (0)