# Class default<T>`Abstract`

#### Type Parameters

- #### T

#### Hierarchy

- default
  - Repo
  - Repo

- Defined in repository.ts:11

#####
Index

### Constructors

constructor

### Properties

dictionary
memoryCache
storage
storageName

### Methods

add
clear
find
fromJSON
getAll
getByIndex
getByKey
indexOf
length
toDictionary
toJSON
create

## Constructors

### constructor

- new default<T>(__namedParameters: RepositoryOptions): default<T>

- #### Type Parameters

  - #### T

  #### Parameters

  - ##### __namedParameters: RepositoryOptions

  #### Returns default<T>

  - Defined in repository.ts:19

## Properties

### dictionary

dictionary: Record<string, T>

- Defined in repository.ts:13

### memoryCache

memoryCache: T[]

- Defined in repository.ts:14

### storage

storage: Storage.Implementation

- Defined in repository.ts:15

### storageName

storageName: string

- Defined in repository.ts:16

## Methods

### add

- add(itemOrItems: T | T[]): Promise<void>

- #### Parameters

  - ##### itemOrItems: T | T[]

  #### Returns Promise<void>

  - Defined in repository.ts:36

### clear

- clear(): Promise<void>

- #### Returns Promise<void>

  - Defined in repository.ts:49

### find

- find(predicate: ((value: T, index: number) => boolean)): null | T

- #### Parameters

  - ##### predicate: ((value: T, index: number) => boolean)

    - - (value: T, index: number): boolean

      - #### Parameters

        - ##### value: T

        - ##### index: number

        #### Returns boolean

  #### Returns null | T

  - Defined in repository.ts:56

### fromJSON

- fromJSON(a: string): T

- #### Parameters

  - ##### a: string

  #### Returns T

  - Defined in repository.ts:85

### getAll

- getAll(): Promise<T[]>

- #### Returns Promise<T[]>

  - Defined in repository.ts:64

### getByIndex

- getByIndex(idx: number): null | T

- #### Parameters

  - ##### idx: number

  #### Returns null | T

  - Defined in repository.ts:60

### getByKey

- getByKey(key: string): null | T

- #### Parameters

  - ##### key: string

  #### Returns null | T

  - Defined in repository.ts:96

### indexOf

- indexOf(item: T): number

- #### Parameters

  - ##### item: T

  #### Returns number

  - Defined in repository.ts:74

### length

- length(): number

- #### Returns number

  - Defined in repository.ts:78

### toDictionary

- toDictionary(items: T[]): Record<string, T>

- #### Parameters

  - ##### items: T[]

  #### Returns Record<string, T>

  - Defined in repository.ts:100

### toJSON

- toJSON(a: T): string

- #### Parameters

  - ##### a: T

  #### Returns string

  - Defined in repository.ts:89

### `Static` create

- create<T>(options: RepositoryOptions): Promise<any>

- #### Type Parameters

  - #### T

  #### Parameters

  - ##### options: RepositoryOptions

  #### Returns Promise<any>

  - Defined in repository.ts:26

Generated using TypeDoc