getSchemaItem Method


getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor?)

Gets the schema item from the specified schema if it exists in this SchemaContext. Will await a partially loaded schema then look in it for the requested item.

getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string | SchemaItemKey, itemNameOrCtor?: T): Promise<InstanceType<T> | undefined>

@returns The requested schema item, or undefined if the item could not be found.

Parameter Type Description
schemaNameOrKey string | SchemaItemKey The SchemaItemKey identifying the item to return or the name of the schema or the schema item full name.
itemNameOrCtor T The name of the item to return or the constructor of the item to return.

Returns - Promise<InstanceType<T> | undefined>

The requested schema item, or undefined if the item could not be found.



getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor?)

Gets the schema item from the specified schema if it exists in this SchemaContext. Will await a partially loaded schema then look in it for the requested item.

getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string | SchemaItemKey, itemNameOrCtor?: T): Promise<SchemaItem | undefined>

@returns The requested schema item, or undefined if the item could not be found.

Parameter Type Description
schemaNameOrKey string | SchemaItemKey The SchemaItemKey identifying the item to return or the name of the schema or the schema item full name.
itemNameOrCtor T The name of the item to return or the constructor of the item to return.

Returns - Promise<SchemaItem | undefined>

The requested schema item, or undefined if the item could not be found.



getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor, itemConstructor?)

Gets the schema item from the specified schema if it exists in this SchemaContext. Will await a partially loaded schema then look in it for the requested item.

getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string, itemNameOrCtor: string, itemConstructor?: T): Promise<InstanceType<T> | undefined>

@returns The requested schema item, or undefined if the item could not be found.

Parameter Type Description
schemaNameOrKey string The SchemaItemKey identifying the item to return or the name of the schema or the schema item full name.
itemNameOrCtor string The name of the item to return or the constructor of the item to return.
itemConstructor T The constructor of the item to return.

Returns - Promise<InstanceType<T> | undefined>

The requested schema item, or undefined if the item could not be found.



getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor, itemConstructor?)

Gets the schema item from the specified schema if it exists in this SchemaContext. Will await a partially loaded schema then look in it for the requested item.

getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string, itemNameOrCtor: string, itemConstructor?: T): Promise<SchemaItem | undefined>

@returns The requested schema item, or undefined if the item could not be found.

Parameter Type Description
schemaNameOrKey string The SchemaItemKey identifying the item to return or the name of the schema or the schema item full name.
itemNameOrCtor string The name of the item to return or the constructor of the item to return.
itemConstructor T The constructor of the item to return.

Returns - Promise<SchemaItem | undefined>

The requested schema item, or undefined if the item could not be found.


Defined in

Last Updated: 28 April, 2026