# 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:266

#####
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:712

## Properties

### _updating

_updating: boolean = false

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

### byFrom

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

#### Type declaration

- ##### [id: Id]: L[]

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

### byId

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

#### Type declaration

- ##### [id: Id]: L

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

### byTo

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

#### Type declaration

- ##### [id: Id]: L[]

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

### byType

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

#### Type declaration

- ##### [id: Id]: L[]

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

### emitter

emitter: EventEmitter

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

### links

links: L[] = []

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

### options

options: MGO

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

### types

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

#### Type declaration

- ##### [id: Id]: L[]

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

### useMinilinksApply

useMinilinksApply: (<L>(ml, name, data?) => any) = useMinilinksApply

#### Type declaration

- - <L>(ml, name, data?): any

  - #### Type Parameters

    - L extends Link<Id>

    #### Parameters

    - ml: any
    - name: string
    - `Optional` data: MinilinksApplyInput | L[]

    #### Returns any

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

### useMinilinksFilter

useMinilinksFilter: (<L, R>(ml, filter, results, interval?) => R) = useMinilinksFilter

#### Type declaration

- - <L, R>(ml, filter, results, interval?): R

  - #### Type Parameters

    - L extends Link<Id>
    - R = any

    #### Parameters

    - ml: any
    - filter: ((currentLink, oldLink, newLink) => boolean)
      - - (currentLink, oldLink, newLink): boolean

        - #### Parameters

          - currentLink: L
          - oldLink: L
          - newLink: L

          #### Returns boolean

    - results: ((l?, ml?, oldLink?, newLink?) => R)
      - - (l?, ml?, oldLink?, newLink?): R

        - #### Parameters

          - `Optional` l: L
          - `Optional` ml: any
          - `Optional` oldLink: L
          - `Optional` newLink: L

          #### Returns R

    - `Optional` interval: number

    #### Returns R

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

### useMinilinksHandle

useMinilinksHandle: (<L>(ml, handler) => void) = useMinilinksHandle

#### Type declaration

- - <L>(ml, handler): void

  - #### Type Parameters

    - L extends Link<Id>

    #### Parameters

    - ml: any
    - handler: ((event, oldLink, newLink) => any)
      - - (event, oldLink, newLink): any

        - #### Parameters

          - event: any
          - oldLink: any
          - newLink: any

          #### Returns any

    #### Returns void

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

### useMinilinksQuery

useMinilinksQuery: (<L>(ml, query) => 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:267

### useMinilinksSubscription

useMinilinksSubscription: (<L>(ml, query) => 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:270

### virtual

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

#### Type declaration

- ##### [id: Id]: Id

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

### virtualCounter

virtualCounter: number = -1

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

### virtualInverted

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

#### Type declaration

- ##### [id: Id]: Id

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

## 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:520

### 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:325

### 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:529

### 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:285

### 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:444

### select

- select(query, options?): any

- #### Parameters

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

  #### Returns any

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

### 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:303

### 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:665