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?

[number, 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

number

Returns

CompiledSchema<T>

Inherited from

ReadonlySchemaCollection.get


has()

has(schemaId): boolean

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

Parameters

schemaId

number

Returns

boolean

Inherited from

ReadonlySchemaCollection.has


keys()

keys(): IterableIterator<number>

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

Returns

IterableIterator<number>

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<[number, CompiledSchema<Record<string, unknown>>]>

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

Returns

IterableIterator<[number, 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<[number, CompiledSchema<Record<string, unknown>>]>

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

Returns

IterableIterator<[number, 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

number

schema

CompiledSchema<T>

Returns

this


delete()

delete(schemaId): boolean

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

Parameters

schemaId

number

Returns

boolean


clear()

clear(): void

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

Returns

void