Skip to content

routier-collection


routier-collection / core/src / ReadonlySchemaCollection

Class: ReadonlySchemaCollection ​

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

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

Extended by ​

Constructors ​

Constructor ​

new ReadonlySchemaCollection(data?): ReadonlySchemaCollection

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

Parameters ​

data? ​

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

Returns ​

ReadonlySchemaCollection

Accessors ​

size ​

Get Signature ​

get size(): number

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

Returns ​

number

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>


has() ​

has(schemaId): boolean

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

Parameters ​

schemaId ​

SchemaId

Returns ​

boolean


keys() ​

keys(): IterableIterator<SchemaId>

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

Returns ​

IterableIterator<SchemaId>


values() ​

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

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

Returns ​

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


entries() ​

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

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

Returns ​

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


forEach() ​

forEach(callbackfn, thisArg?): void

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

Parameters ​

callbackfn ​

(value, key, map) => void

thisArg? ​

any

Returns ​

void


[iterator]() ​

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

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

Returns ​

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


getByName() ​

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

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

Type Parameters ​

T ​

T

Parameters ​

collectionName ​

string

Returns ​

CompiledSchema<T>

Released under the MIT License.