Skip to content

routier-collection


routier-collection / core/src / SchemaCollection

Class: SchemaCollection ​

Defined in: core/src/collections/SchemaCollection.ts:7

Collection of schemas with generic typing for type-safe schema retrieval

Extends ​

Constructors ​

Constructor ​

new SchemaCollection(data?): SchemaCollection

Defined in: core/src/collections/ReadonlySchemaCollection.ts:10

Parameters ​

data? ​

[SchemaId, CompiledSchema<Record<string, unknown>>][]

Returns ​

SchemaCollection

Inherited from ​

ReadonlySchemaCollection.constructor

Accessors ​

size ​

Get Signature ​

get size(): number

Defined in: core/src/collections/ReadonlySchemaCollection.ts:22

Returns ​

number

Inherited from ​

ReadonlySchemaCollection.size

Methods ​

get() ​

get<T>(schemaId): CompiledSchema<T>

Defined in: core/src/collections/ReadonlySchemaCollection.ts:14

Type Parameters ​

T ​

T

Parameters ​

schemaId ​

SchemaId

Returns ​

CompiledSchema<T>

Inherited from ​

ReadonlySchemaCollection.get


has() ​

has(schemaId): boolean

Defined in: core/src/collections/ReadonlySchemaCollection.ts:18

Parameters ​

schemaId ​

SchemaId

Returns ​

boolean

Inherited from ​

ReadonlySchemaCollection.has


keys() ​

keys(): IterableIterator<SchemaId>

Defined in: core/src/collections/ReadonlySchemaCollection.ts:26

Returns ​

IterableIterator<SchemaId>

Inherited from ​

ReadonlySchemaCollection.keys


values() ​

values(): IterableIterator<CompiledSchema<Record<string, unknown>>>

Defined in: core/src/collections/ReadonlySchemaCollection.ts:30

Returns ​

IterableIterator<CompiledSchema<Record<string, unknown>>>

Inherited from ​

ReadonlySchemaCollection.values


entries() ​

entries(): IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]>

Defined in: core/src/collections/ReadonlySchemaCollection.ts:34

Returns ​

IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]>

Inherited from ​

ReadonlySchemaCollection.entries


forEach() ​

forEach(callbackfn, thisArg?): void

Defined in: core/src/collections/ReadonlySchemaCollection.ts:38

Parameters ​

callbackfn ​

(value, key, map) => void

thisArg? ​

any

Returns ​

void

Inherited from ​

ReadonlySchemaCollection.forEach


[iterator]() ​

[iterator](): IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]>

Defined in: core/src/collections/ReadonlySchemaCollection.ts:42

Returns ​

IterableIterator<[SchemaId, CompiledSchema<Record<string, unknown>>]>

Inherited from ​

ReadonlySchemaCollection.[iterator]


getByName() ​

getByName<T>(collectionName): CompiledSchema<T>

Defined in: core/src/collections/ReadonlySchemaCollection.ts:46

Type Parameters ​

T ​

T

Parameters ​

collectionName ​

string

Returns ​

CompiledSchema<T>

Inherited from ​

ReadonlySchemaCollection.getByName


set() ​

set<T>(schemaId, schema): this

Defined in: core/src/collections/SchemaCollection.ts:9

Type Parameters ​

T ​

T

Parameters ​

schemaId ​

SchemaId

schema ​

CompiledSchema<T>

Returns ​

this


delete() ​

delete(schemaId): boolean

Defined in: core/src/collections/SchemaCollection.ts:14

Parameters ​

schemaId ​

SchemaId

Returns ​

boolean


clear() ​

clear(): void

Defined in: core/src/collections/SchemaCollection.ts:18

Returns ​

void

Released under the MIT License.