Skip to content

Latest commit

 

History

History
147 lines (86 loc) · 2.52 KB

File metadata and controls

147 lines (86 loc) · 2.52 KB
id CollectionLike
title CollectionLike

Interface: CollectionLike<T, TKey>

Defined in: packages/db/src/types.ts:13

Interface for a collection-like object that provides the necessary methods for the change events system to work

Extends

  • Pick<Collection<T, TKey>, "get" | "has" | "entries" | "indexes" | "id" | "compareOptions">

Type Parameters

T

T extends object = Record<string, unknown>

TKey

TKey extends string | number = string | number

Properties

compareOptions

compareOptions: StringCollationConfig;

Defined in: packages/db/src/collection/index.ts:580

Inherited from

CollectionImpl.compareOptions


id

id: string;

Defined in: packages/db/src/collection/index.ts:273

Inherited from

CollectionImpl.id


indexes

indexes: Map<number, BaseIndex<TKey>>;

Defined in: packages/db/src/collection/index.ts:565

Inherited from

Pick.indexes

Methods

entries()

entries(): IterableIterator<[TKey, T]>;

Defined in: packages/db/src/collection/index.ts:489

Get all entries (virtual derived state)

Returns

IterableIterator<[TKey, T]>

Inherited from

Pick.entries

get()

get(key): T | undefined;

Defined in: packages/db/src/collection/index.ts:454

Get the current value for a key (virtual derived state)

Parameters

key

TKey

Returns

T | undefined

Inherited from

Pick.get

has()

has(key): boolean;

Defined in: packages/db/src/collection/index.ts:461

Check if a key exists in the collection (virtual derived state)

Parameters

key

TKey

Returns

boolean

Inherited from

Pick.has