# Class MinilinkCollection<MGO, L>

#### Type Parameters

- MGO extends MinilinksGeneratorOptions = typeof MinilinksGeneratorOptionsDefault
- L extends Link<Id> = Link<Id>

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:272

#####
Index

### Constructors

constructor

### Properties

_updating
byFrom
byId
byTo
byType
emitter
links
options
types
useMinilinksApply
useMinilinksFilter
useMinilinksHandle
useMinilinksQuery
useMinilinksSubscription
virtual
virtualCounter
virtualInverted

### Methods

_toPlainLinksArray
add
apply
query
remove
select
subscribe
update

##
Constructors

### constructor

- new MinilinkCollection<MGO, L>(options?, memory?): MinilinkCollection<MGO, L>

- #### Type Parameters

  - MGO extends MinilinksGeneratorOptions = MinilinksGeneratorOptions
  - L extends Link<Id> = Link<Id>

  #### Parameters

  - `Optional` options: MGO
  - `Optional` memory: any

  #### Returns MinilinkCollection<MGO, L>

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:718

##
Properties

### _updating

_updating: boolean = false

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:525

### byFrom

byFrom: {
[id: Id]: L[];
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:284

### byId

byId: {
[id: Id]: L;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:283

### byTo

byTo: {
[id: Id]: L[];
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:285

### byType

byType: {
[id: Id]: L[];
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:286

### emitter

emitter: EventEmitter<DefaultEventMap>

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:289

### links

links: L[] = []

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:287

### options

options: MGO

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:288

### types

types: {
[id: Id]: L[];
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:282

### useMinilinksApply

useMinilinksApply: (<L>(ml: any, name: string, data?: MinilinksApplyInput | L[]) => any) = useMinilinksApply

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:275

### useMinilinksFilter

useMinilinksFilter: (<L, R>(ml: any, filter: ((currentLink: L, oldLink: L, newLink: L) => boolean), results: ((l?: L, ml?: any, oldLink?: L, newLink?: L) => R), interval?: number) => R) = useMinilinksFilter

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:274

### useMinilinksHandle

useMinilinksHandle: (<L>(ml: any, handler: ((event: any, oldLink: any, newLink: any) => any)) => void) = useMinilinksHandle

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:277

### useMinilinksQuery

useMinilinksQuery: (<L>(ml: any, query: Id | QueryLink) => any) = useMinilinksQuery

#### Type declaration

- - <L>(ml, query): any

  - React hook. Returns reactiviely links from minilinks, by query in deeplinks dialect. Recalculates when query changes. (Take query into useMemo!).

    #### Type Parameters

    - L extends Link<Id>

    #### Parameters

    - ml: any
    - query: Id | QueryLink

    #### Returns any

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:273

### useMinilinksSubscription

useMinilinksSubscription: (<L>(ml: any, query: Id | QueryLink) => any) = useMinilinksSubscription

#### Type declaration

- - <L>(ml, query): any

  - React hook. Returns reactiviely links from minilinks, by query in deeplinks dialect. Recalculates when data in minilinks changes. (Take query into useMemo!).

    #### Type Parameters

    - L extends Link<Id>

    #### Parameters

    - ml: any
    - query: Id | QueryLink

    #### Returns any

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:276

### virtual

virtual: {
[id: Id]: Id;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:279

### virtualCounter

virtualCounter: number = -1

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:281

### virtualInverted

virtualInverted: {
[id: Id]: Id;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:280

##
Methods

### _toPlainLinksArray

- _toPlainLinksArray(linkOrLinks, applyOptions, plainLinksArray, returnLinksPathsById): void

- #### Parameters

  - linkOrLinks: any
  - applyOptions: any
  - plainLinksArray: any
  - returnLinksPathsById: any

  #### Returns void

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:526

### add

- add(linksArray, applyName?): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - linksArray: any[]
  - applyName: string = ''

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:331

### apply

- apply(_input, applyName?, applyOptions?): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - _input: any[] | MinilinksApplyInput
  - applyName: string = ''
  - `Optional` applyOptions: ApplyOptions

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:535

### query

- query<A>(query, options?): A extends string
  ? any
  : L[]

- #### Type Parameters

  - A

  #### Parameters

  - query: Id | QueryLink
  - `Optional` options: MinilinksQueryOptions<A>

  #### Returns A extends string
  ? any
  : L[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:291

### remove

- remove(idsArray): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - idsArray: any[]

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:450

### select

- select(query, options?): any

- #### Parameters

  - query: Id | QueryLink
  - `Optional` options: MinilinksQueryOptions<MinilinksQueryOptionAggregate>

  #### Returns any

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:300

### subscribe

- subscribe(query): Observable<any>

- minilinks.subscribe

  #### Parameters

  - query: Id | QueryLink

  #### Returns Observable<any>

  #### Example

      minilinks.subscribe({ type_id: 2 }).subscribe({ next: (links) => {}, error: (err) => {} });

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:309

### update

- update(linksArray): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - linksArray: any[]

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:671