getSchemaItem Method
getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor?)
getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string | SchemaItemKey, itemNameOrCtor?: T): Promise<undefined | SchemaItem>
| Parameter | Type | Description |
|---|---|---|
| schemaNameOrKey | string | SchemaItemKey | |
| itemNameOrCtor | T |
Returns - Promise<undefined | SchemaItem>
getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor, itemConstructor?)
getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string, itemNameOrCtor: string, itemConstructor?: T): Promise<undefined | InstanceType<T>>
| Parameter | Type | Description |
|---|---|---|
| schemaNameOrKey | string | |
| itemNameOrCtor | string | |
| itemConstructor | T |
Returns - Promise<undefined | InstanceType<T>>
getSchemaItem<T extends SchemaItem>(schemaNameOrKey, itemNameOrCtor, itemConstructor?)
getSchemaItem<T extends SchemaItem>(schemaNameOrKey: string, itemNameOrCtor: string, itemConstructor?: T): Promise<undefined | SchemaItem>
| Parameter | Type | Description |
|---|---|---|
| schemaNameOrKey | string | |
| itemNameOrCtor | string | |
| itemConstructor | T |
Returns - Promise<undefined | SchemaItem>
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<undefined | InstanceType<T>>
@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<undefined | InstanceType<T>>
The requested schema item, or undefined if the item could not be found.
Defined in
- ecschema-metadata/src/Context.ts Line 428
Last Updated: 28 October, 2025