7
7
normalizeArray ,
8
8
} from '@agile-ts/utils' ;
9
9
import { logCodeManager } from '../logCodeManager' ;
10
- import { Agile } from '../agile' ;
10
+ import type { Agile } from '../agile' ;
11
11
import { PatchOptionConfigInterface } from '../state' ;
12
- import { ComputedTracker } from '../computed' ;
12
+ import { ComputedTracker } from '../computed/computed.tracker' ; // Not imported directly from '../computed' due circular dependencies
13
13
import { Item } from './item' ;
14
14
import { SelectorConfigInterface , Selector , SelectorKey } from './selector' ;
15
15
import {
@@ -1181,9 +1181,7 @@ export class Collection<DataType extends DefaultItem = DefaultItem> {
1181
1181
* @public
1182
1182
* @param itemKeys - Item/s with identifier/s to be removed.
1183
1183
*/
1184
- public remove (
1185
- itemKeys : ItemKey | Array < ItemKey >
1186
- ) : {
1184
+ public remove ( itemKeys : ItemKey | Array < ItemKey > ) : {
1187
1185
fromGroups : ( groups : Array < ItemKey > | ItemKey ) => Collection < DataType > ;
1188
1186
everywhere : ( config ?: RemoveItemsConfigInterface ) => Collection < DataType > ;
1189
1187
} {
@@ -1518,13 +1516,12 @@ export interface CreateCollectionConfigImpl<
1518
1516
initialData ?: Array < DataType > ;
1519
1517
}
1520
1518
1521
- export type CreateCollectionConfig <
1522
- DataType extends DefaultItem = DefaultItem
1523
- > =
1524
- | CreateCollectionConfigImpl < DataType >
1525
- | ( (
1526
- collection : Collection < DataType >
1527
- ) => CreateCollectionConfigImpl < DataType > ) ;
1519
+ export type CreateCollectionConfig < DataType extends DefaultItem = DefaultItem > =
1520
+
1521
+ | CreateCollectionConfigImpl < DataType >
1522
+ | ( (
1523
+ collection : Collection < DataType >
1524
+ ) => CreateCollectionConfigImpl < DataType > ) ;
1528
1525
1529
1526
export interface CollectionConfigInterface {
1530
1527
/**
@@ -1542,8 +1539,9 @@ export interface CollectionConfigInterface {
1542
1539
defaultGroupKey : ItemKey ;
1543
1540
}
1544
1541
1545
- export interface CollectConfigInterface < DataType = any >
1546
- extends AssignDataConfigInterface {
1542
+ export interface CollectConfigInterface <
1543
+ DataType extends DefaultItem = DefaultItem
1544
+ > extends AssignDataConfigInterface {
1547
1545
/**
1548
1546
* In which way the collected data should be added to the Collection.
1549
1547
* - 'push' = at the end
0 commit comments